package com.howells.time.base.http;

import com.howells.time.base.utils.JsonUtils;
import com.zhy.http.okhttp.callback.Callback;

import java.util.List;

import okhttp3.Response;

/**
 * Created by Administrator on 2016.4.15.
 */
public abstract class JsonArrayCallback extends Callback<List<Object>> {

    @Override
    public List<Object> parseNetworkResponse(Response response, int id) throws Exception {
        String body = response.body().string();
        List<Object> list = JsonUtils.Json2List(body, Object.class);
        return list;
    }
}
